package book;

public  class Book  {
    public boolean isBoorwed;
    private String  name;
    private String author;
    private  String type;
    private int rice;
    private  boolean isBorrowed;

    public Book(String name, String author,  String type ,int rice) {
        this.name = name;
        this.author = author;
        this.type = type;
        this.rice = rice;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public int getRice() {
        return rice;
    }

    public void setRice(int rice) {
        this.rice = rice;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setBorrowed(boolean isBorrowed) {
        this.isBorrowed = isBorrowed;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", rice=" + rice +
                ", type='" + type + '\'' +
                ((isBorrowed == true) ? "已借出" : "未借出") +
    '}';//", isBorrowed=" + isBorrowed +
    }
}
